Skip to content

Conversation

@RohitKini
Copy link
Contributor

Hotfix to avoid security issues.

@RohitKini RohitKini requested a review from a team as a code owner December 3, 2025 09:08
@RohitKini RohitKini requested a review from Copilot December 3, 2025 09:18
Copilot finished reviewing on behalf of RohitKini December 3, 2025 09:20
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR is a hotfix addressing security issues related to prototype pollution by upgrading dependencies and removing the .includeOwner() API calls that were exposing user information. The changes also include corrections for non-existent package versions and modernization of Next.js patterns.

Key Changes

  • Security Fix: Removed .includeOwner() calls from Contentstack SDK queries to prevent information disclosure
  • Dependency Corrections: Fixed Next.js and related packages from non-existent v16.x to stable v15.x
  • Next.js Modernization: Updated Link components to remove deprecated legacyBehavior prop, improved Script loading strategy

Reviewed changes

Copilot reviewed 15 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
package.json Corrected Next.js from v16.0.5 to v15.5.6 and updated dependencies to stable versions
package-lock.json Updated lockfile to reflect corrected package versions and new dependencies
tsconfig.json Added ES2017 target and included dev types directory
next.config.mjs Added serverExternalPackages, image patterns, and webpack fallbacks for better compatibility
next-env.d.ts Updated TypeScript references and documentation link
contentstack-sdk/index.js Removed .includeOwner() calls for security, updated Live Preview SDK initialization to v4.x
components/tool-tip.tsx Fixed clearInterval bug to clearTimeout, improved hooks usage with proper cleanup
components/section.tsx Removed deprecated Link legacyBehavior wrapper
components/hero-banner.tsx Removed deprecated Link legacyBehavior wrapper
components/header.tsx Removed deprecated Link legacyBehavior wrapper
components/footer.tsx Removed deprecated Link legacyBehavior wrapper
components/card-section.tsx Removed deprecated Link legacyBehavior wrapper
components/blog-section.tsx Removed deprecated Link legacyBehavior wrapper
components/blog-list.tsx Removed deprecated Link legacyBehavior wrapper
components/archive-relative.tsx Removed deprecated Link legacyBehavior wrapper
app/page.tsx Updated state initialization and render condition
app/layout.tsx Removed unnecessary async, reorganized structure, moved Script to proper location with lazyOnload strategy
app/blog/[post]/page.tsx Minor formatting adjustment

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hanoak20 hanoak20 self-requested a review December 3, 2025 10:00
Copy link

@Amitkanswal Amitkanswal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls check following comments

Copy link

@Amitkanswal Amitkanswal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@hanoak20 hanoak20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants